*This file runs the regressions for Table A6


*Table A6, Panel A: Differential Impacts for Reservations with BIA projects, did_multiplegt
*******************************************************************************
*******************************************************************************

*Part i): reservations with no bia project


*Baseline with no rezxt controls
did_multiplegt agpct ID	 year alt_post_nobia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*off-rez population
did_multiplegt agpct ID	 year alt_post_nobia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*casinos
did_multiplegt agpct ID	 year alt_post_nobia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*credit
did_multiplegt agpct ID	 year alt_post_nobia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*all rez-t controls
did_multiplegt agpct ID	 year alt_post_nobia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 



*Part ii): reservations with  BIA project

*no rez-t controls
did_multiplegt agpct ID	 year alt_post_bia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*off-rez population
did_multiplegt agpct ID	 year alt_post_bia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*casinos
did_multiplegt agpct ID	 year alt_post_bia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*credit
did_multiplegt agpct ID	 year alt_post_bia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 

*all rez-t controls
did_multiplegt agpct ID	 year alt_post_bia, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Development (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 



*Table A6, Panel B: Differential Impacts for Reservations with BIA projects, csdid
*******************************************************************************
*******************************************************************************


*Part i): reservations with no BIA project

preserve
*keep if dropthis ==0  

eststo clear
*Baseline with no rezxt controls
csdid agpct , ivar(ID) time(t) gvar(TG_NO_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid agpct offrespop, ivar(ID) time(t) gvar(TG_NO_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*casinos
csdid agpct has_casino, ivar(ID) time(t) gvar(TG_NO_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*credit
csdid agpct has_credit, ivar(ID) time(t) gvar(TG_NO_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid agpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG_NO_BIA)  cluster(TOWNSHIP) agg(simple) drimp




*Part ii): reservations with  BIA project


eststo clear
*Baseline with no rezxt controls
csdid agpct , ivar(ID) time(t) gvar(TG_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid agpct offrespop, ivar(ID) time(t) gvar(TG_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*casinos
csdid agpct has_casino, ivar(ID) time(t) gvar(TG_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*credit
csdid agpct has_credit, ivar(ID) time(t) gvar(TG_BIA)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid agpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG_BIA)  cluster(TOWNSHIP) agg(simple) drimp


restore



*Table A6, Panel C: Differential Impacts for Reservations with BIA projects, TWFE
*******************************************************************************
*******************************************************************************


eststo clear
*Baseline with no rezxt controls
reghdfe agpct post bia_post , absorb(ID stateXyear) cluster(TOWNSHIP)
est sto twfe_ag_bia_1

*off-rez population
reghdfe agpct post  bia_post offrespop , absorb(ID stateXyear) cluster(TOWNSHIP)
est sto twfe_ag_bia_2

*casinos
reghdfe agpct post  bia_post has_casino, absorb(ID stateXyear) cluster(TOWNSHIP)
est sto twfe_ag_bia_3

*credit
reghdfe agpct post bia_post has_credit, absorb(ID stateXyear) cluster(TOWNSHIP)
est sto twfe_ag_bia_4

*all rez-t controls
reghdfe agpct post bia_post offrespop has_casino has_credit, absorb(ID stateXyear) cluster(TOWNSHIP)
est sto twfe_ag_bia_5


esttab twfe_ag_bia*,  se(a3) b(a3) star(* 0.1 ** 0.05 *** 0.01) ar2  replace   scalar(N_clust M1 MDV diff pval)


